<?php /*a:1:{s:88:"E:\phpStudy\PHPTutorial\WWW\phpNetBook\www.tp6.com\app\admin\view\admin\group_power.html";i:1623660372;}*/ ?>
<!DOCTYPE HTML>

<html>

<head>

    <meta charset="utf-8">

    <meta name="renderer" content="webkit|ie-comp|ie-stand">

    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

    <meta name="viewport"
          content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />

    <meta http-equiv="Cache-Control" content="no-siteapp" />

    <link rel="Bookmark" href="/favicon.ico">

    <link rel="Shortcut Icon" href="/favicon.ico" />

    <!--[if lt IE 9]>

    <script type="text/javascript" src="lib/html5shiv.js"></script>

    <script type="text/javascript" src="lib/respond.min.js"></script>

    <![endif]-->

    <link rel="stylesheet" type="text/css" href="/static/admin/static/h-ui/css/H-ui.min.css" />

    <link rel="stylesheet" type="text/css" href="/static/admin/static//h-ui.admin/css/H-ui.admin.css" />

    <link rel="stylesheet" type="text/css" href="/static/admin/lib/Hui-iconfont/1.0.8/iconfont.css" />

    <link rel="stylesheet" type="text/css" href="/static/admin/static/h-ui.admin/skin/default/skin.css"
          id="skin" />

    <link rel="stylesheet" type="text/css" href="/static/admin/static/h-ui.admin/css/style.css" />

    <link rel="stylesheet" type="text/css" href="/static/admin/css/common.css" />

    <link rel="stylesheet" type="text/css" href="/static/index/css/font-awesome.min.css" />

    <script type="text/javascript" src="/static/admin/lib/jquery/1.9.1/jquery.min.js"></script>

    <title>后台管理系统</title>



</head>

<body>



<body>

<article class="page-container">

    <form class="form form-horizontal" id="form-admin-add" action="" method="post">





        <div class="row cl">

            <label class="form-label col-xs-4 col-sm-3">用户组名称：</label>

            <div class="formControls col-xs-8 col-sm-9">

                <input type="text" class="input-text" value="<?php echo htmlentities($authGroupData['title']); ?>" placeholder="" name="title"
                       required="true">

                <input type="hidden" class="input-text" value="<?php echo htmlentities($authGroupData['id']); ?>" placeholder="" name="id"
                       required="true">

            </div>

        </div>



        <div class="row cl">

            <label class="form-label col-xs-4 col-sm-3">分配权限：</label>

            <div class="formControls col-xs-8 col-sm-9">

                <!-- 权限分配 -->

                <table class="table table-hover">

                    <thead class="bordered-darkorange">

                    <tr>

                        <th>

                            <label style="padding:0 15px 0 0;">

                                <input id="chkAll" onclick="CheckAll(this.form)" value="全选" type="checkbox"
                                       class="colored-success checkbox-parent" type="checkbox">

                                <span class="text">权限全选</span>

                            </label>

                        </th>

                    </tr>

                    </thead>

                    <tbody>

                    <?php if(is_array($authRuleData) || $authRuleData instanceof \think\Collection || $authRuleData instanceof \think\Paginator): $i = 0; $__LIST__ = $authRuleData;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
                    <tr>

                        <td>

                            <label style="padding-right:15px;">

                                <input id="<?php echo htmlentities($vo['id']); ?>" value="<?php echo htmlentities($vo['id']); ?>" name="rules[]" dataid="id-<?php echo htmlentities($vo['id']); ?>"
                                       class="colored-success checkbox-parent" type="checkbox"
                                       <?php 
                                       if(in_array($vo['id'],$rulesArr)){echo 'checked';}
                                 ?>>

                                <span class="text"><?php echo htmlentities($vo['title']); ?></span>

                            </label>

                        </td>

                    </tr>
                    <?php if($vo['children']): if(is_array($vo['children']) || $vo['children'] instanceof \think\Collection || $vo['children'] instanceof \think\Paginator): $i = 0; $__LIST__ = $vo['children'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo1): $mod = ($i % 2 );++$i;?>
                    <tr>

                        <td style="padding-left:30px;">

                            <label style="padding-right:15px;">

                                <input class="colored-success checkbox-parent checkbox-child" id="<?php echo htmlentities($vo1['id']); ?>"
                                       value="<?php echo htmlentities($vo1['id']); ?>" name="rules[]" dataid="id-<?php echo htmlentities($vo['id']); ?>-<?php echo htmlentities($vo1['id']); ?>" type="checkbox" <?php 
                                       if(in_array($vo1['id'],$rulesArr)){echo 'checked';}
                                 ?>>

                                <span class="text"><?php echo htmlentities($vo1['title']); ?></span>

                            </label>

                        </td>

                    </tr>
                    <?php endforeach; endif; else: echo "" ;endif; ?>
                    <?php endif; ?>
                    <?php endforeach; endif; else: echo "" ;endif; ?>









                    </tbody>

                </table>

                <!-- 权限分配 -->

            </div>

        </div>





        <div class="row cl">

            <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">

                <input class="btn btn-primary radius" type="submit" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">

            </div>

        </div>

    </form>

</article>



<!--_footer 作为公共模版分离出去-->



<script type="text/javascript" src="/static/admin/lib/layer/2.4/layer.js"></script>

<script type="text/javascript" src="/static/admin/static/h-ui/js/H-ui.min.js"></script>

<script type="text/javascript" src="/static/admin/static/h-ui.admin/js/H-ui.admin.js"></script>



<script type="text/javascript" src="/static/admin/layui/layui.js"></script>



<script type="text/javascript" src="/static/admin/lib/ueditor/1.4.3/ueditor.config.js"></script>

<script type="text/javascript" src="/static/admin/lib/ueditor/1.4.3/ueditor.all.min.js"> </script>

<script type="text/javascript" src="/static/admin/lib/ueditor/1.4.3/lang/zh-cn/zh-cn.js"></script>

<script src="/static/admin/lib/My97DatePicker/4.8/WdatePicker.js"></script>



<script src="/static/admin/js/common.js"></script><!-- 后台公共自定义js -->




<!--请在下方写此页面业务相关的脚本-->

<script type="text/javascript" src="lib/jquery.validation/1.14.0/jquery.validate.js"></script>

<script type="text/javascript" src="lib/jquery.validation/1.14.0/validate-methods.js"></script>

<script type="text/javascript" src="lib/jquery.validation/1.14.0/messages_zh.js"></script>

<script type="text/javascript">

    /* 权限配置 */

    $(function () {

        //动态选择框，上下级选中状态变化

        $('input.checkbox-parent').on('change', function () {

            var dataid = $(this).attr("dataid");

            $('input[dataid^=' + dataid + ']').prop('checked', $(this).is(':checked'));

        });

        $('input.checkbox-child').on('change', function () {

            var dataid = $(this).attr("dataid");

            dataid = dataid.substring(0, dataid.lastIndexOf("-"));

            var parent = $('input[dataid=' + dataid + ']');

            if ($(this).is(':checked')) {

                parent.prop('checked', true);

                //循环到顶级

                while (dataid.lastIndexOf("-") != 2) {

                    dataid = dataid.substring(0, dataid.lastIndexOf("-"));

                    parent = $('input[dataid=' + dataid + ']');

                    parent.prop('checked', true);

                }

            } else {

                //父级

                if ($('input[dataid^=' + dataid + '-]:checked').length == 0) {

                    parent.prop('checked', false);

                    //循环到顶级

                    while (dataid.lastIndexOf("-") != 2) {

                        dataid = dataid.substring(0, dataid.lastIndexOf("-"));

                        parent = $('input[dataid=' + dataid + ']');

                        if ($('input[dataid^=' + dataid + '-]:checked').length == 0) {

                            parent.prop('checked', false);

                        }

                    }

                }

            }

        });

    });

</script>

<!--/请在上方写此页面业务相关的脚本-->


<script type="text/javascript">
    (function () {
        var tab_tit = document.getElementById('think_page_trace_tab_tit').getElementsByTagName('span');
        var tab_cont = document.getElementById('think_page_trace_tab_cont').getElementsByTagName('div');
        var open = document.getElementById('think_page_trace_open');
        var close = document.getElementById('think_page_trace_close').children[0];
        var trace = document.getElementById('think_page_trace_tab');
        var cookie = document.cookie.match(/thinkphp_show_page_trace=(\d\|\d)/);
        var history = (cookie && typeof cookie[1] != 'undefined' && cookie[1].split('|')) || [0, 0];
        open.onclick = function () {
            trace.style.display = 'block';
            this.style.display = 'none';
            close.parentNode.style.display = 'block';
            history[0] = 1;
            document.cookie = 'thinkphp_show_page_trace=' + history.join('|')
        }
        close.onclick = function () {
            trace.style.display = 'none';
            this.parentNode.style.display = 'none';
            open.style.display = 'block';
            history[0] = 0;
            document.cookie = 'thinkphp_show_page_trace=' + history.join('|')
        }
        for (var i = 0; i < tab_tit.length; i++) {
            tab_tit[i].onclick = (function (i) {
                return function () {
                    for (var j = 0; j < tab_cont.length; j++) {
                        tab_cont[j].style.display = 'none';
                        tab_tit[j].style.color = '#999';
                    }
                    tab_cont[i].style.display = 'block';
                    tab_tit[i].style.color = '#000';
                    history[1] = i;
                    document.cookie = 'thinkphp_show_page_trace=' + history.join('|')
                }
            })(i)
        }
        parseInt(history[0]) && open.click();
        tab_tit[history[1]].click();
    })();
</script>
</body>

</html>
